package org.jsrml.core.purchaser.qo;

import org.jsrml.common.persistence.BaseQO;
import org.jsrml.common.persistence.query.QueryCondition;
import org.jsrml.common.persistence.query.QueryConditionType;
import org.jsrml.common.persistence.query.QueryConfig;
import org.jsrml.core.base.qo.RoleQO;

@SuppressWarnings("serial")
@QueryConfig(daoBeanId = "workerService")
public class WorkerQO extends BaseQO<String> {

	@QueryCondition(name = "name", type = QueryConditionType.LIKE_ANYWHERE)
	private String name;

	@QueryCondition(name = "baseInfo.authAccountId")
	private String authAccountId;

	@QueryCondition(name = "roles", type = QueryConditionType.FETCH_EAGER)
	private boolean fetchRoles;

	@QueryCondition(name = "authAccount", type = QueryConditionType.FETCH_EAGER)
	private boolean fetchAuthAccount;

	@QueryCondition(name = "roles", type = QueryConditionType.LEFT_JOIN)
	private RoleQO roleQO;

	@QueryCondition(name = "telephone", type = QueryConditionType.LIKE_ANYWHERE)
	private String telephone;

	@QueryCondition(name = "company", type = QueryConditionType.LEFT_JOIN)
	private CompanyQO companyQO;

	@QueryCondition(name = "company", type = QueryConditionType.FETCH_EAGER)
	private boolean fetchCompany;

	@QueryCondition(name = "department", type = QueryConditionType.LEFT_JOIN)
	private DepartmentQO departmentQO;

	@QueryCondition(name = "department", type = QueryConditionType.FETCH_EAGER)
	private boolean fetchDepartment;

	@QueryCondition(name = "positions", type = QueryConditionType.LEFT_JOIN)
	private PositionsQO positionsQO;

	@QueryCondition(name = "positions", type = QueryConditionType.FETCH_EAGER)
	private boolean fetchPositions;

	@QueryCondition(name = "status.remove")
	private Boolean remove;

	public boolean isFetchRoles() {
		return fetchRoles;
	}

	public void setFetchRoles(boolean fetchRoles) {
		this.fetchRoles = fetchRoles;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isFetchAuthAccount() {
		return fetchAuthAccount;
	}

	public void setFetchAuthAccount(boolean fetchAuthAccount) {
		this.fetchAuthAccount = fetchAuthAccount;
	}

	public String getAuthAccountId() {
		return authAccountId;
	}

	public void setAuthAccountId(String authAccountId) {
		this.authAccountId = authAccountId;
	}

	public RoleQO getRoleQO() {
		return roleQO;
	}

	public void setRoleQO(RoleQO roleQO) {
		this.roleQO = roleQO;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public CompanyQO getCompanyQO() {
		return companyQO;
	}

	public void setCompanyQO(CompanyQO companyQO) {
		this.companyQO = companyQO;
	}

	public boolean isFetchCompany() {
		return fetchCompany;
	}

	public void setFetchCompany(boolean fetchCompany) {
		this.fetchCompany = fetchCompany;
	}

	public DepartmentQO getDepartmentQO() {
		return departmentQO;
	}

	public void setDepartmentQO(DepartmentQO departmentQO) {
		this.departmentQO = departmentQO;
	}

	public boolean isFetchDepartment() {
		return fetchDepartment;
	}

	public void setFetchDepartment(boolean fetchDepartment) {
		this.fetchDepartment = fetchDepartment;
	}

	public PositionsQO getPositionsQO() {
		return positionsQO;
	}

	public void setPositionsQO(PositionsQO positionsQO) {
		this.positionsQO = positionsQO;
	}

	public boolean isFetchPositions() {
		return fetchPositions;
	}

	public void setFetchPositions(boolean fetchPositions) {
		this.fetchPositions = fetchPositions;
	}

	public Boolean getRemove() {
		return remove;
	}

	public void setRemove(Boolean remove) {
		this.remove = remove;
	}

}
